package com.mo.lib.utils.view

import android.view.View
import androidx.coordinatorlayout.widget.CoordinatorLayout
import com.google.android.material.bottomsheet.BottomSheetBehavior

/**
 * @ author：mo
 * @ data：2022/7/26:15:50
 * @ 功能：
 */
/** 获取联动行为管理*/
fun View.getBottomSheetBehavior(): BottomSheetBehavior<View>? {
    return if (this.parent is CoordinatorLayout) {
        BottomSheetBehavior.from(this)
    } else {
        null
    }
}